import { post, get, put, deleteapi } from "./apis/newaxios.js";
export default {
    login(params) {  //登录
        return post('/user/session', params)
    },
    register(params) {   //注册
        return post('/user/session/register', params)
    },
    sms(params) {  //验证码
        return post('/user/send_sms', params)
    },
    resetpass(params){  //忘记秘密
        return put('/user/session/forget_password', params)
    },
    addressSearch(params,diy){  //地址搜索
        return get('/address/search', params,diy)
    },
    addressbook(params,diy){  //地址簿
        return get('/address/address',params,diy)
    },
    deladdressbook(params,id){  //删除地址薄
        return deleteapi('/address/address/'+id ,params)
    },
    defaultAddressBook(params,id){  //设为默认地址薄
        return put('/address/address/'+id,params)
    },
    newAddressBook(params){  //添加地址薄
        return post('/address/address',params)
    },
    myUser(params,diy){ //我的信息
        return get('/common/user/0',params,diy)
    },
    preorder(params){ //下单预检查
        return post('express/order/pre_order',params)
    },
    myOrder(params){  //我的订单
        return get('/express/order',params)
    },
    Citylist(params){ //城市列表
        return get('/system/site',params)
    },
    myCoupon(params){  //我的优惠卷
        return get('/user/coupon',params)
    },
    wxlogo(params){ //微信登陆
        return post('/user/wechat/login',params)
    }, 
    getmoneylist(params){  //获取账户流水
        return get('/money/record',params)
    },
    getmoney(params){  //获取账户流水详情
        return get('/money/record',params)
    },
    payment(id,params){
        return get('/common/pay/' + id ,params)
    },
    orderroute(params){  //订单路由
        return get('/express/order/' + params,'')
    },
    moneyRecharge(params){
        return post('/money/recharge',params)
    },
    ordercancel(id,params){  //取消订单
        return deleteapi('/express/order/'+id ,params)
    },
    sureAddorder(params){
        return post('express/order',params)
    },
    isfirstpirce(params){
        return get('money/record?pageSize=1',params)
    },
    testCode(params){  //验证验证码
        return get('common/code/verification_code',params)
    },
    callcode(params){
        return post('user/send_voice_sms',params)
    }





}